package com.example.elementui1.service;

import com.example.elementui1.mapper.UserMapper;
import com.example.elementui1.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public List<User> getUserAll() {
        return userMapper.getUserAll();
    }
    public void add(User user) {
        userMapper.add(user);
    }
    public void update(User user) {
        userMapper.update(user);
    }
    public void delete(Integer id) {
        userMapper.delete(id);
    }

}
